<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<!-- bootstrap -->
	<link href="<?php echo C('ADMIN_CSS_URL');?>bootstrap/bootstrap.css" rel="stylesheet" />
	<link href="<?php echo C('ADMIN_CSS_URL');?>bootstrap/bootstrap-responsive.css" rel="stylesheet" />
	<link href="<?php echo C('ADMIN_CSS_URL');?>bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />

	<!--&lt;!&ndash; global styles &ndash;&gt;-->
	<!--<link rel="stylesheet" type="text/css" href="<?php echo C('ADMIN_CSS_URL');?>layout.css" />-->
	<link rel="stylesheet" type="text/css" href="<?php echo C('ADMIN_CSS_URL');?>elements.css" />
	<!--<link rel="stylesheet" type="text/css" href="<?php echo C('ADMIN_CSS_URL');?>icons.css" />-->

	<!-- libraries -->
	<!--<link href="<?php echo C('ADMIN_CSS_URL');?>lib/font-awesome.css" type="text/css" rel="stylesheet" />-->

	<!-- this page specific styles -->
	<link rel="stylesheet" href="<?php echo C('ADMIN_CSS_URL');?>compiled/gallery.css" type="text/css" media="screen" />

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>

<!-- main container -->
<div class="content">


	<div class="container-fluid">
		<div id="pad-wrapper" class="gallery">
			<!-- gallery wrapper -->
			<div class="gallery-wrapper">
				<div class="row gallery-row">
					<!-- single image -->
					<?php if(is_array($pics_info)): foreach($pics_info as $key=>$v): ?><div class="span3 img-container">
							<div class="img-box">
                                <a  href="<?php echo U('Pic/showlist',array('pics_id'=>$v['pics_id']));?>"><img style="width: 230px; height:215px; " src="<?php echo (substr($v['pics_logo'],1)); ?>" alt="没有图片" /></a>
                                <p style="text-align: left">
                                    <a href="<?php echo U('Pic/add',array('pics_id'=>$v['pics_id']));?>">添加相片</a>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <a style="color:red;" href="javascript:void(0)" onclick="if(confirm('您确定要删除该相册吗？')){del(<?php echo ($v["pics_id"]); ?>);}">删除相册</a>
                                </p>
								<script type="text/javascript">
									function del(pics_id) {
										$.ajax({
											url: "<?php echo U('Pictures/del');?>",
											data: {'pics_id': pics_id},
											dataType: 'json',
											type: 'post',
											success: function (msg) {
//                                                console.log(msg.status);
												if (msg.status == 1) {
													window.location.href = "<?php echo U('Pictures/showlist');?>";
												}
											}
										});
									}
								</script>
                                <p class="title" style="text-align: left">
                                    相册名称：&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo U('Pic/showlist',array('pics_id'=>$v['pics_id']));?>"><?php echo ($v["pics_name"]); ?></a>
								</p>
                                <p style="text-align: left">
                                    相册描述：&nbsp;&nbsp;&nbsp;&nbsp;<span><?php echo ($v["pics_description"]); ?></span>
                                </p>
							</div>
						</div><?php endforeach; endif; ?>
					<!-- new image button -->
					<div class="span3 new-img">
                        <a href="<?php echo U('Pictures/add');?>"><img src="<?php echo C('ADMIN_IMG_URL');?>new-gallery-img.png" /></a>
                        <a href="<?php echo U('Pictures/add');?>">添加新相册</a>
					</div>

				</div>
			</div>
			<!-- end gallery wrapper -->


		</div>
	</div>
</div>
<!-- end main container -->


<!-- this page scripts -->
<script src="<?php echo C('ADMIN_JS_URL');?>jquery-latest.js"></script>
<script src="<?php echo C('ADMIN_JS_URL');?>bootstrap.min.js"></script>
<script src="<?php echo C('ADMIN_JS_URL');?>theme.js"></script>


</html>